package Demo02;

public class Demo02 {

    private int age;

    public void setAge(int age) {
        if (age >= 0 && age <= 100) {
            this.age = age;
        } else {
            System.out.println("不合法！");
        }
    }
}
